﻿using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ymatou.API.Common;
using Ymatou.ServiceCenter;
using YmatouSeller.NoticeAPI.Model.Response;

namespace YmatouSeller.NoticeAPI.Model.Request
{
    [Resource("sellernotice.iapi.ymatou.com", "api/NoticeManage/GetUserIDLstByLoginIds", Method.POST, ParameterBuildType.Json)]
    public class GetUserIDLstByLoginIdsRequest : BaseRequestModel<GetUserIDLstByLoginIdsResponse>
    {
        public override string ApiName
        {
            get { return "api/NoticeManage/GetUserIDLstByLoginIds"; }
        }

        public override bool HttpGet
        {
            get
            {
                return false;
            }
        }

        /// <summary>
        /// 传入用户名列表或者用户ID列表
        /// </summary>
        public List<string> LoginIds { get; set; }

        /// <summary>
        /// 查询用户信息类型(0:用户名；1:用户ID)
        /// </summary>
        public int AccoutType { get; set; }

        public override void Validate()
        {
            const string errCode = "-1";
            if (LoginIds == null || LoginIds.Count <= 0)
                throw new Ymatou.API.Common.BussniessException(errCode, "用户名不能为空");

            base.Validate();
        }
    }
}
